<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .min {
      position: relative;

      width: 400px;
      height: 330px;
      margin-top: 10px;
      border: 1px #ccc solid;

    }

    .middle {
      height: 260px;
      overflow-y: auto;
    }


    .text {
      text-align: center;
    }

    .min .num {
      display: inline-block;
      border-radius: 100%;
      background-color: #ccc;
      padding: 0 3px;
      margin: 3px
    }

    .page {
      position: absolute;
      bottom: 0;
    }
  </style>
</head>

<body>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  <!-- 引入样式 -->
  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  <!-- 引入组件库 -->
  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  <div id="app">
    <el-input v-model="val" style="width: 200px" :clearable="false" size="small"></el-input>
    <!-- <div class="min"> -->

      <!-- <div class="text">最小值 - 最大值</div>
      <div class="middle">
        <div v-for="(item, index) in minData" :key="index" class="num">
          {{item}}
        </div>
      </div>
      <div class="page">
        <div @click="handlePre" class="">上一页</div>
        <div @click="handleNext" class="">下一页</div>
      </div> -->
    <!-- </div> -->

  </div>
  <script>

    var app = new Vue({
      el: '#app',
      data: {
        val: '',
        minData: [],
        maxData: []
      },
      created () {

      },
      mounted () {
        for (i = 0; i < 101; i++) {
          this.minData.push(i)
        }
        for (i = 101; i < 101 + 100; i++) {
          this.maxData.push(i)
        }
      },
      methods: {

        handlePre () {
          console.log('上一页');
          let [first] = this.minData
          console.log('first: ', first);
          this.minData = []
          for (let i = first - 100; i < first; i++) {
            this.minData.push(i)

          }
        },
        handleNext () {
          console.log('下一页');
          let last = this.minData[this.minData.length - 1]
          console.log('last: ', last);
          this.minData = []
          for (let i = last; i < last + 100; i++) {
            this.minData.push(i)

          }
        },


      }
    }
    )
  </script>


</body>

</html>